The present disclosure relates generally to exposure of telecommunication (“telecom”) services as web services, and relates more particularly to providing an application programming interface (API) that models telecom services using a uniform resource identifier (URI).
Application programmers, including application developers for web-based services, often provide users or customers with software platforms that enable various services for the user or customer. For example, an application may be provided to a user of a given website to permit the user to send a text message to a chosen text message address. In such a case, the application programmer provisions the application with the text messaging feature, and exposes various inputs to permit the user to activate the feature to implement the text messaging. The application programmer may implement the service of text messaging based on knowledge of application programming interfaces (APIs) that are offered by various telecom providers of text messaging services. Each telecom provider tends to have proprietary or specific APIs used to invoke the desired services, such as a text messaging service. The application programmer utilizes the APIs provided by the telecom providers, with the appropriate parameters, to invoke a text message service, for example.
Due to the potentially large number of APIs that may be used to implement services from various service providers, some APIs follow a particular paradigm in their invocation and usage. For example, a common paradigm or usage for web-based services that use APIs is referred to as a representational state transfer (REST) style of software architecture. Application software that conforms to REST constraints is typically referred to as being “RESTful.” REST-style architectures typically consist of clients and servers. Clients typically initiate requests to servers, which process requests and return appropriate responses. Requests and responses are built around the transfer of “representations” of “resources”. A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource typically captures the current or intended state of a resource.
RESTful web service APIs are ubiquitous, used for everything from search engines to social networking web-sites. A RESTful API typically models the “resource” to which a request is applied as part of a uniform resource identifier (URI) web service and the action requested in the HTTP method (GET, POST, DELETE, PUT). Parameters relating to the request can be encoded using XML in the payload of the request. This approach—where the API models the resource—supports the notion of interacting with a tangible object. For example, a request can be made to POST a new feature request to a website, or GET an existing feature. An API with a RESTful format is very familiar to web application developers, and the provision of an API may benefit from having this type of form in accordance with RESTful principles from the standpoint of usability.
Among telecom service providers that might provide different types of telecom services, the APIs are typically nonstandard, or proprietary, and may not always correspond to or support a RESTful resource model. Typically, many third party telecom web service providers have unique APIs, some of which may be based on RESTful principles, and which model a service as a resource in the URI. For example, a third party telecom web service provider may model an SMS service with a URI of /<web_server>/sms and a location-based service with a URI of /<web_service>/location_service, where <web_server> represents an IP address of a web server providing the third party telecom web service. With this type of definition for access to an API, an application developer might view the conceptual model of the URI as an SMS transmission engine, or as a location identification agent, respectively. Accordingly, the third party telecom web service provider offers an API that provides access to resources modeled as services.
When the resource is modeled as a service being offered, such as sending an SMS text message, for example, the application programmer typically apprises him/herself of the underlying infrastructure and how the request is to be made. Accordingly, the application programmer learns a number of proprietary or unique interfaces among the different service providers, adding to the complexity and difficulty of provisioning a web-based application with telecom services. It would be highly desirable to obtain a more standardized or readily usable service interface for use with web-based applications.